home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
vs
/
browser
/
cpn11b1.exe
/
DATA.Z
/
entry.wrl
< prev
next >
Wrap
Text File
|
1996-10-29
|
6KB
|
199 lines
#VRML V2.0 utf8
# Copyright(C) 1996 Sony Corporation. All rights reserved.
Anchor {
url "main.wrl"
description "Analog Clock (displays the current time in 3D)"
children [
DEF OBJ Transform{
scale 2.0 2.0 2.0
children [
DEF CLOCK Transform{
rotation 1.0 0.0 0.0 1.57
children [
DEF BASE Transform{
translation 0.0 -0.2 0.0
children [
Shape{
appearance Appearance{
material DEF BASE_MAT Material{
diffuseColor 0.5 0.5 0.5
transparency 0.5
}
}
geometry Cylinder { height 0.30, radius 0.52 }
}
Shape{
appearance Appearance{
material Material{
diffuseColor 0.7 0.7 0.7
transparency 0.5
}
}
geometry Cylinder { height 0.25, radius 0.60 }
}
]
}
DEF 0 Transform{
translation 0.0 0.0 -0.4
children [
Shape{
appearance Appearance{
material Material{
diffuseColor 1.0 1.0 1.0
emissiveColor 0.5 1.0 0.5
}
}
geometry Cylinder { height 0.02, radius 0.06 }
}
]
}
DEF 3 Transform{
translation 0.4 0.0 0.0
children [
Shape{
appearance Appearance{
material Material{
diffuseColor 1.0 1.0 1.0
emissiveColor 0.5 1.0 0.5
}
}
geometry Cylinder { height 0.02, radius 0.03 }
}
]
}
DEF 6 Transform{
translation 0.0 0.0 0.4
children [
Shape{
appearance Appearance{
material Material{
diffuseColor 1.0 1.0 1.0
emissiveColor 0.5 1.0 0.5
}
}
geometry Cylinder { height 0.02, radius 0.03 }
}
]
}
DEF 9 Transform{
translation -0.4 0.0 0.0
children [
Shape{
appearance Appearance{
material Material{
diffuseColor 1.0 1.0 1.0
emissiveColor 0.5 1.0 0.5
}
}
geometry Cylinder { height 0.02, radius 0.03 }
}
]
}
DEF HOUR_HAND Transform{
rotation 0.0 1.0 0.0 1.04
children [
Transform{
translation 0.0 0.0 -0.15
children [
Shape{
appearance Appearance{
material Material{
diffuseColor 1.0 1.0 1.0
emissiveColor 0.5 1.0 0.5
}
}
geometry Box { size 0.06 0.01 0.35 }
}
]
}
]
}
DEF LONG_HAND Transform{
rotation 0.0 1.0 0.0 -1.04
children [
Transform{
translation 0.0 0.0 -0.18
children [
Shape{
appearance Appearance{
material Material{
diffuseColor 1.0 1.0 1.0
emissiveColor 0.5 1.0 0.5
}
}
geometry Box { size 0.04 0.01 0.5 }
}
]
}
]
}
]
}
]
}
]
}
DEF MINUTE_TIMER TimeSensor{
cycleInterval 5
loop TRUE
stopTime -1
}
DEF HOUR_TIMER TimeSensor{
cycleInterval 60
loop TRUE
stopTime -1
}
DEF MINUTE_ROT OrientationInterpolator{
key [ 0.0, 0.5 1.0 ]
keyValue [
0 1 0 0.00,
0 1 0 -3.14,
0 1 0 -6.28
]
}
DEF HOUR_ROT OrientationInterpolator{
key [ 0.0, 0.5 1.0 ]
keyValue [
0 1 0 0.00,
0 1 0 -3.14,
0 1 0 -6.28
]
}
DEF COLOR_TIMER TimeSensor{
cycleInterval 24
loop TRUE
stopTime -1
}
DEF BASE_COLOR ColorInterpolator{
key [0.0, 0.15, 0.3, 0.45, 0.6, 0.75, 1.0]
keyValue [
0.8 0.3 0.3,
0.8 0.8 0.3,
0.3 0.8 0.3,
0.3 0.8 0.8,
0.3 0.3 0.8,
0.8 0.3 0.8,
0.8 0.3 0.3
]
}
ROUTE COLOR_TIMER.fraction_changed TO BASE_COLOR.set_fraction
ROUTE BASE_COLOR.value_changed TO BASE_MAT.set_diffuseColor
ROUTE MINUTE_TIMER.fraction_changed TO MINUTE_ROT.set_fraction
ROUTE MINUTE_ROT.value_changed TO LONG_HAND.set_rotation
ROUTE HOUR_TIMER.fraction_changed TO HOUR_ROT.set_fraction
ROUTE HOUR_ROT.value_changed TO HOUR_HAND.set_rotation